package InheritanceAndRewriting;

public class Monkey extends Animal{
    private String hobby;
    private double weight;

    public Monkey(String name,int age,String species,String habitat,String hobby,double weight)
    {
        super(name, age, species, habitat);
        this.hobby=hobby;
        this.weight=weight;
    }

    public void makeSound()
    {
        System.out.println("The monkey says 'Ooh ooh ah ah'.");
    }

    public void eat()
    {
        System.out.println("The monkey is eating bananas.");
    }

    public void climbTree()
    {
        System.out.println("The monkey " + getName() + " is climbing a tree.");
    }

    public void displayInfo() {
        super.displayInfo();
        System.out.println("Hobby: " + hobby + ", Weight: " + weight);
    }

    public String getName() {
        return super.getName();
    }
}
